package com.azhuo.utils;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class CreateId {

	@Autowired
	private IdWorker idWorker;
	
	public int createId() {
		String strId = String.valueOf(idWorker.nextId()).substring(0, 8);
		return Integer.parseInt(strId);
	}
}
